package com.ITArmy.dao;

import com.ITArmy.beans.Reply;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ReplyMapper {
    int deleteByPrimaryKey(Long rId);

    int insert(Reply record);

    int insertSelective(Reply record);

    Reply selectByPrimaryKey(Long rId);

    int updateByPrimaryKeySelective(Reply record);

    int updateByPrimaryKey(Reply record);

    //根据评论的id找到所有的回复信息

    List<Reply> selectAllReply(long cId);

    Reply findReplyByUidAndTime(@Param("uid") long uid, @Param("date") Date date);


    /**
     * 通过评论删除回复
     * @param cid cid
     * @return int
     */
    int deleteReplyByCid(long cid);

    /**
     *获取回复数量
     * @param cid cid
     * @return int
     */
    int replycount(long cid);
}